test: Add unit tests for ParseNumberFromBrackets - #3878
Open
damansingh1313 wants to merge 2 commits into
Open
Conversation
pyiceberg/utils/parsing.py was the only module under pyiceberg/utils without a dedicated test. ParseNumberFromBrackets backs parsing of bucket[N], truncate[N] and fixed[L], so cover its match behaviour and the ValidationError raised on malformed input.
Author
|
Hi @kevinjqliu, @Fokko |
ebyhr
reviewed
Aug 31, 2026
Verify the full ValidationError message for the invalid-input cases and parametrize them. Remove the multi-digit case (already covered) and the cases that relied on re.search tolerating text around the pattern.
rambleraptor
approved these changes
Aug 31, 2026
rambleraptor
left a comment
Collaborator
There was a problem hiding this comment.
Great test fix. Thanks for doing this!
Fokko
approved these changes
Sep 7, 2026
Fokko
left a comment
Contributor
There was a problem hiding this comment.
Thanks for adding this @damansingh1313 and thanks @rambleraptor and @ebyhr for the review 🚀
Fokko
enabled auto-merge
September 7, 2026 09:03
Collaborator
|
@damansingh1313 sometime today, can you try pushing up an empty commit? A couple GitHub runners seem to have stalled out and it's stopping merge @Fokko @kevinjqliu let me know if this isn't the right method. I'm not sure if this is in the merge queue or not. |
Author
|
Sure, I can give it a try but it will again require approval i guess, it should be fine? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pyiceberg/utils/parsing.py was the only module under pyiceberg/utils without a dedicated test. ParseNumberFromBrackets backs parsing of bucket[N], truncate[N] and fixed[L], so cover its match behaviour and the ValidationError raised on malformed input.
Rationale for this change
Are these changes tested?
It is a unit tests which are tested in local console.
Are there any user-facing changes?